 #  -*- coding:utf-8 -*-
"""
@ author: 罗金盛
@ time: 2024/3/6 
@ file: 12.常见装饰器.py

"""
class LJS:
    def __init__(self):
        self.age = '20'

    @property   # property 把类方法转化为类属性方式获取
    def ljs_age(self):
        return self.age
    @ljs_age.setter
    def ljs_age(self,value):
        self.age = value

    @ljs_age.deleter
    def ljs_age(self):
        del self.age

L = LJS()
L.ljs_age=21
print(L.ljs_age)
# del L.ljs_age
# print(L.ljs_age)